<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width" />
    <title>HELLO，AMAP!</title>
    <style>
        html,
        body,
        #container {
            width: 100%;
            height: 100%;
        }
    </style>
</head>

<body>
    <button class="kk">返回首页</button>
    <div id="container"></div>
    <script type="text/javascript">
        window._AMapSecurityConfig = {
            securityJsCode: "f6326beb0c7190508d471ddc565653b2",
        };
    </script>
    <script src="https://webapi.amap.com/loader.js"></script>
    <script type="text/javascript">
        AMapLoader.load({
            key: "303c347fc9277ea96f84bf1504bdfed7", //申请好的Web端开发者 Key，调用 load 时必填
            version: "2.0", //指定要加载的 JS API 的版本，缺省时默认为 1.4.15
        })
            .then((AMap) => {
                const map = new AMap.Map("container",{
                    center:[113.428155,34.774258]
                });
                const marker = new AMap.Marker({
                    position: [113.428155,34.774258], //位置
                });
                map.add(marker); //添加到地图
            })
            .catch((e) => {
                console.error(e); //加载错误提示
            });
    </script>
    <script>
        document.querySelector('.kk').addEventListener('click',()=>{
            location.assign("./考试.html")
        })
    </script>
</body>

</html>